/*
	Copyright (C) 2019 Zongming Liu <1849059316@qq.com>

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License along
	with this program; if not, write to the Free Software Foundation, Inc.,
	51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef Color_h__
#define Color_h__
#include <DirectXMath.h>
#include "Vector.h"
#include <d2d1.h>

namespace SkyEngine2d
{
	
	//! 颜色 r,g,b,a
	class SGE_API Color
		:public DirectX::XMFLOAT4
	{
	public:
		Color()
			:DirectX::XMFLOAT4(0, 0, 0, 1) {}
	
		Color(float r, float g, float b, float a = 1.0f)
			:DirectX::XMFLOAT4(r, g, b, a) {}
	
		explicit Color(const Vector4 & v)
			:DirectX::XMFLOAT4(v.x, v.y, v.z, v.w) {}
	
		explicit Color(const Vector3 & v)
			:Color(v.x, v.y, v.z) {}
	
		operator D2D1_COLOR_F() { D2D1_COLOR_F c; c.a = w; c.b = z; c.g = y; c.r = x; return c; }
		
		Color(DirectX::XMVECTOR  v) { XMStoreFloat4(this, v); }
	
		operator DirectX::XMVECTOR() { return x, XMLoadFloat4(this); }
	
		bool operator==(const Color& color)const;
	
	public:
		static Color AliceBlue;
		static Color AntiqueWhite;
		static Color Aqua;
		static Color Aquamarine;
		static Color Azure;
		static Color Beige;
		static Color Bisque;
		static Color Black;
		static Color BlanchedAlmond;
		static Color Blue;
		static Color BlueViolet;
		static Color Brown;
		static Color BurlyWood;
		static Color CadetBlue;
		static Color Chartreuse;
		static Color Chocolate;
		static Color Coral;
		static Color CornflowerBlue;
		static Color Cornsilk;
		static Color Crimson;
		static Color Cyan;
		static Color DarkBlue;
		static Color DarkCyan;
		static Color DarkGoldenrod;
		static Color DarkGray;
		static Color DarkGreen;
		static Color DarkKhaki;
		static Color DarkMagenta;
		static Color DarkOliveGreen;
		static Color DarkOrange;
		static Color DarkOrchid;
		static Color DarkRed;
		static Color DarkSalmon;
		static Color DarkSeaGreen;
		static Color DarkSlateBlue;
		static Color DarkSlateGray;
		static Color DarkTurquoise;
		static Color DarkViolet;
		static Color DeepPink;
		static Color DeepSkyBlue;
		static Color DimGray;
		static Color DodgerBlue;
		static Color Firebrick;
		static Color FloralWhite;
		static Color ForestGreen;
		static Color Fuchsia;
		static Color Gainsboro;
		static Color GhostWhite;
		static Color Gold;
		static Color Goldenrod;
		static Color Gray;
		static Color Green;
		static Color GreenYellow;
		static Color Honeydew;
		static Color HotPink;
		static Color IndianRed;
		static Color Indigo;
		static Color Ivory;
		static Color Khaki;
		static Color Lavender;
		static Color LavenderBlush;
		static Color LawnGreen;
		static Color LemonChiffon;
		static Color LightBlue;
		static Color LightCoral;
		static Color LightCyan;
		static Color LightGoldenrodYellow;
		static Color LightGreen;
		static Color LightGray;
		static Color LightPink;
		static Color LightSalmon;
		static Color LightSeaGreen;
		static Color LightSkyBlue;
		static Color LightSlateGray;
		static Color LightSteelBlue;
		static Color LightYellow;
		static Color Lime;
		static Color LimeGreen;
		static Color Linen;
		static Color Magenta;
		static Color Maroon;
		static Color MediumAquamarine;
		static Color MediumBlue;
		static Color MediumOrchid;
		static Color MediumPurple;
		static Color MediumSeaGreen;
		static Color MediumSlateBlue;
		static Color MediumSpringGreen;
		static Color MediumTurquoise;
		static Color MediumVioletRed;
		static Color MidnightBlue;
		static Color MintCream;
		static Color MistyRose;
		static Color Moccasin;
		static Color NavajoWhite;
		static Color Navy;
		static Color OldLace;
		static Color Olive;
		static Color OliveDrab;
		static Color Orange;
		static Color OrangeRed;
		static Color Orchid;
		static Color PaleGoldenrod;
		static Color PaleGreen;
		static Color PaleTurquoise;
		static Color PaleVioletRed;
		static Color PapayaWhip;
		static Color PeachPuff;
		static Color Peru;
		static Color Pink;
		static Color Plum;
		static Color PowderBlue;
		static Color Purple;
		static Color Red;
		static Color RosyBrown;
		static Color RoyalBlue;
		static Color SaddleBrown;
		static Color Salmon;
		static Color SandyBrown;
		static Color SeaGreen;
		static Color SeaShell;
		static Color Sienna;
		static Color Silver;
		static Color SkyBlue;
		static Color SlateBlue;
		static Color SlateGray;
		static Color Snow;
		static Color SpringGreen;
		static Color SteelBlue;
		static Color Tan;
		static Color Teal;
		static Color Thistle;
		static Color Tomato;
		static Color Transparent;
		static Color Turquoise;
		static Color Violet;
		static Color Wheat;
		static Color White;
		static Color WhiteSmoke;
		static Color Yellow;
		static Color YellowGreen;
	
	};
}

#endif // Color_h__
